package com.zhao.dota.vo;

import cn.hutool.core.bean.BeanUtil;
import com.zhao.dota.model.MatchPlayerItem;
import com.zhao.dota.util.SteamUtil;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
public class MatchPlayerItemVo extends MatchPlayerItem {

    private String icon;

    public MatchPlayerItemVo(MatchPlayerItem matchPlayerItem) {
        BeanUtil.copyProperties(matchPlayerItem, this);
        this.icon = SteamUtil.getIconUrlByItemName(matchPlayerItem.getName());
    }

}
